package com.hospital.pharmacy.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class FinanceExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public FinanceExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andFinInAccountIsNull() {
            addCriterion("fin_in_account is null");
            return (Criteria) this;
        }

        public Criteria andFinInAccountIsNotNull() {
            addCriterion("fin_in_account is not null");
            return (Criteria) this;
        }

        public Criteria andFinInAccountEqualTo(Double value) {
            addCriterion("fin_in_account =", value, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountNotEqualTo(Double value) {
            addCriterion("fin_in_account <>", value, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountGreaterThan(Double value) {
            addCriterion("fin_in_account >", value, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountGreaterThanOrEqualTo(Double value) {
            addCriterion("fin_in_account >=", value, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountLessThan(Double value) {
            addCriterion("fin_in_account <", value, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountLessThanOrEqualTo(Double value) {
            addCriterion("fin_in_account <=", value, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountIn(List<Double> values) {
            addCriterion("fin_in_account in", values, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountNotIn(List<Double> values) {
            addCriterion("fin_in_account not in", values, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountBetween(Double value1, Double value2) {
            addCriterion("fin_in_account between", value1, value2, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinInAccountNotBetween(Double value1, Double value2) {
            addCriterion("fin_in_account not between", value1, value2, "finInAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountIsNull() {
            addCriterion("fin_out_account is null");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountIsNotNull() {
            addCriterion("fin_out_account is not null");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountEqualTo(Double value) {
            addCriterion("fin_out_account =", value, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountNotEqualTo(Double value) {
            addCriterion("fin_out_account <>", value, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountGreaterThan(Double value) {
            addCriterion("fin_out_account >", value, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountGreaterThanOrEqualTo(Double value) {
            addCriterion("fin_out_account >=", value, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountLessThan(Double value) {
            addCriterion("fin_out_account <", value, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountLessThanOrEqualTo(Double value) {
            addCriterion("fin_out_account <=", value, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountIn(List<Double> values) {
            addCriterion("fin_out_account in", values, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountNotIn(List<Double> values) {
            addCriterion("fin_out_account not in", values, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountBetween(Double value1, Double value2) {
            addCriterion("fin_out_account between", value1, value2, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinOutAccountNotBetween(Double value1, Double value2) {
            addCriterion("fin_out_account not between", value1, value2, "finOutAccount");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdIsNull() {
            addCriterion("fin_type_id is null");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdIsNotNull() {
            addCriterion("fin_type_id is not null");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdEqualTo(Integer value) {
            addCriterion("fin_type_id =", value, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdNotEqualTo(Integer value) {
            addCriterion("fin_type_id <>", value, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdGreaterThan(Integer value) {
            addCriterion("fin_type_id >", value, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("fin_type_id >=", value, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdLessThan(Integer value) {
            addCriterion("fin_type_id <", value, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("fin_type_id <=", value, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdIn(List<Integer> values) {
            addCriterion("fin_type_id in", values, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdNotIn(List<Integer> values) {
            addCriterion("fin_type_id not in", values, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("fin_type_id between", value1, value2, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("fin_type_id not between", value1, value2, "finTypeId");
            return (Criteria) this;
        }

        public Criteria andFinPersonIsNull() {
            addCriterion("fin_person is null");
            return (Criteria) this;
        }

        public Criteria andFinPersonIsNotNull() {
            addCriterion("fin_person is not null");
            return (Criteria) this;
        }

        public Criteria andFinPersonEqualTo(String value) {
            addCriterion("fin_person =", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonNotEqualTo(String value) {
            addCriterion("fin_person <>", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonGreaterThan(String value) {
            addCriterion("fin_person >", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonGreaterThanOrEqualTo(String value) {
            addCriterion("fin_person >=", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonLessThan(String value) {
            addCriterion("fin_person <", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonLessThanOrEqualTo(String value) {
            addCriterion("fin_person <=", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonLike(String value) {
            addCriterion("fin_person like", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonNotLike(String value) {
            addCriterion("fin_person not like", value, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonIn(List<String> values) {
            addCriterion("fin_person in", values, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonNotIn(List<String> values) {
            addCriterion("fin_person not in", values, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonBetween(String value1, String value2) {
            addCriterion("fin_person between", value1, value2, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinPersonNotBetween(String value1, String value2) {
            addCriterion("fin_person not between", value1, value2, "finPerson");
            return (Criteria) this;
        }

        public Criteria andFinTimeIsNull() {
            addCriterion("fin_time is null");
            return (Criteria) this;
        }

        public Criteria andFinTimeIsNotNull() {
            addCriterion("fin_time is not null");
            return (Criteria) this;
        }

        public Criteria andFinTimeEqualTo(Date value) {
            addCriterion("fin_time =", value, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeNotEqualTo(Date value) {
            addCriterion("fin_time <>", value, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeGreaterThan(Date value) {
            addCriterion("fin_time >", value, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("fin_time >=", value, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeLessThan(Date value) {
            addCriterion("fin_time <", value, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeLessThanOrEqualTo(Date value) {
            addCriterion("fin_time <=", value, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeIn(List<Date> values) {
            addCriterion("fin_time in", values, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeNotIn(List<Date> values) {
            addCriterion("fin_time not in", values, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeBetween(Date value1, Date value2) {
            addCriterion("fin_time between", value1, value2, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinTimeNotBetween(Date value1, Date value2) {
            addCriterion("fin_time not between", value1, value2, "finTime");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalIsNull() {
            addCriterion("fin_earn_total is null");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalIsNotNull() {
            addCriterion("fin_earn_total is not null");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalEqualTo(Double value) {
            addCriterion("fin_earn_total =", value, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalNotEqualTo(Double value) {
            addCriterion("fin_earn_total <>", value, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalGreaterThan(Double value) {
            addCriterion("fin_earn_total >", value, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalGreaterThanOrEqualTo(Double value) {
            addCriterion("fin_earn_total >=", value, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalLessThan(Double value) {
            addCriterion("fin_earn_total <", value, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalLessThanOrEqualTo(Double value) {
            addCriterion("fin_earn_total <=", value, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalIn(List<Double> values) {
            addCriterion("fin_earn_total in", values, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalNotIn(List<Double> values) {
            addCriterion("fin_earn_total not in", values, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalBetween(Double value1, Double value2) {
            addCriterion("fin_earn_total between", value1, value2, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinEarnTotalNotBetween(Double value1, Double value2) {
            addCriterion("fin_earn_total not between", value1, value2, "finEarnTotal");
            return (Criteria) this;
        }

        public Criteria andFinRemarkIsNull() {
            addCriterion("fin_remark is null");
            return (Criteria) this;
        }

        public Criteria andFinRemarkIsNotNull() {
            addCriterion("fin_remark is not null");
            return (Criteria) this;
        }

        public Criteria andFinRemarkEqualTo(String value) {
            addCriterion("fin_remark =", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkNotEqualTo(String value) {
            addCriterion("fin_remark <>", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkGreaterThan(String value) {
            addCriterion("fin_remark >", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkGreaterThanOrEqualTo(String value) {
            addCriterion("fin_remark >=", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkLessThan(String value) {
            addCriterion("fin_remark <", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkLessThanOrEqualTo(String value) {
            addCriterion("fin_remark <=", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkLike(String value) {
            addCriterion("fin_remark like", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkNotLike(String value) {
            addCriterion("fin_remark not like", value, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkIn(List<String> values) {
            addCriterion("fin_remark in", values, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkNotIn(List<String> values) {
            addCriterion("fin_remark not in", values, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkBetween(String value1, String value2) {
            addCriterion("fin_remark between", value1, value2, "finRemark");
            return (Criteria) this;
        }

        public Criteria andFinRemarkNotBetween(String value1, String value2) {
            addCriterion("fin_remark not between", value1, value2, "finRemark");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}